package com.yex.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.yex.entity.InvestmentOrderEntity;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 报单订单
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2019-01-04 15:11:55
 */
public interface InvestmentOrderDao extends BaseMapper<InvestmentOrderEntity> {

    Integer updateReplyByStatus(@Param("id") Integer id);

    Integer updateRedeemByStatus(@Param("id") Integer id);

    Integer updateInterestByStatus(@Param("id") Integer id);

    Integer updateAutoRedeemByStatus(@Param("id") Integer id);

    List<InvestmentOrderEntity> selectInvestmentOrderList();

    List<InvestmentOrderEntity> selectInterestOrderList();

    List<InvestmentOrderEntity> selectExpireInterestOrderList(@Param("time")Date time);

    InvestmentOrderEntity selectByUserId(@Param("investmentId") Integer investmentId, @Param("userId") Integer userId);

    Integer updateIntroStatus(@Param("id") Integer id);

    List<InvestmentOrderEntity> selectInvestmentOrderByUserId(@Param("userId")Integer userId);

    InvestmentOrderEntity selectUserInvestmentOrder(@Param("userId")Integer userId);

}
